\(\int \frac {\sqrt {x}}{\sqrt {1-x}} \, dx\) [647]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (verified)
   Fricas [A] (verification not implemented)
   Sympy [C] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 15, antiderivative size = 27 \[ \int \frac {\sqrt {x}}{\sqrt {1-x}} \, dx=-\sqrt {1-x} \sqrt {x}-\frac {1}{2} \arcsin (1-2 x) \]

[Out]

1/2*arcsin(-1+2*x)-(1-x)^(1/2)*x^(1/2)

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.267, Rules used = {52, 55, 633, 222} \[ \int \frac {\sqrt {x}}{\sqrt {1-x}} \, dx=-\frac {1}{2} \arcsin (1-2 x)-\sqrt {1-x} \sqrt {x} \]

[In]

Int[Sqrt[x]/Sqrt[1 - x],x]

[Out]

-(Sqrt[1 - x]*Sqrt[x]) - ArcSin[1 - 2*x]/2

Rule 52

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^n/(b*(
m + n + 1))), x] + Dist[n*((b*c - a*d)/(b*(m + n + 1))), Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a
, b, c, d}, x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && NeQ[m + n + 1, 0] &&  !(IGtQ[m, 0] && ( !IntegerQ[n] || (G
tQ[m, 0] && LtQ[m - n, 0]))) &&  !ILtQ[m + n + 2, 0] && IntLinearQ[a, b, c, d, m, n, x]

Rule 55

Int[1/(Sqrt[(a_) + (b_.)*(x_)]*Sqrt[(c_.) + (d_.)*(x_)]), x_Symbol] :> Int[1/Sqrt[a*c - b*(a - c)*x - b^2*x^2]
, x] /; FreeQ[{a, b, c, d}, x] && EqQ[b + d, 0] && GtQ[a + c, 0]

Rule 222

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[Rt[-b, 2]*(x/Sqrt[a])]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rule 633

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dist[1/(2*c*(-4*(c/(b^2 - 4*a*c)))^p), Subst[Int[Si
mp[1 - x^2/(b^2 - 4*a*c), x]^p, x], x, b + 2*c*x], x] /; FreeQ[{a, b, c, p}, x] && GtQ[4*a - b^2/c, 0]

Rubi steps \begin{align*} \text {integral}& = -\sqrt {1-x} \sqrt {x}+\frac {1}{2} \int \frac {1}{\sqrt {1-x} \sqrt {x}} \, dx \\ & = -\sqrt {1-x} \sqrt {x}+\frac {1}{2} \int \frac {1}{\sqrt {x-x^2}} \, dx \\ & = -\sqrt {1-x} \sqrt {x}-\frac {1}{2} \text {Subst}\left (\int \frac {1}{\sqrt {1-x^2}} \, dx,x,1-2 x\right ) \\ & = -\sqrt {1-x} \sqrt {x}-\frac {1}{2} \sin ^{-1}(1-2 x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.30 \[ \int \frac {\sqrt {x}}{\sqrt {1-x}} \, dx=-\sqrt {-((-1+x) x)}+2 \arctan \left (\frac {\sqrt {x}}{-1+\sqrt {1-x}}\right ) \]

[In]

Integrate[Sqrt[x]/Sqrt[1 - x],x]

[Out]

-Sqrt[-((-1 + x)*x)] + 2*ArcTan[Sqrt[x]/(-1 + Sqrt[1 - x])]

Maple [C] (verified)

Result contains complex when optimal does not.

Time = 0.12 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.26

method result size
meijerg \(\frac {i \left (i \sqrt {\pi }\, \sqrt {x}\, \sqrt {1-x}-i \sqrt {\pi }\, \arcsin \left (\sqrt {x}\right )\right )}{\sqrt {\pi }}\) \(34\)
default \(-\sqrt {1-x}\, \sqrt {x}+\frac {\sqrt {x \left (1-x \right )}\, \arcsin \left (-1+2 x \right )}{2 \sqrt {x}\, \sqrt {1-x}}\) \(41\)
risch \(\frac {\left (-1+x \right ) \sqrt {x}\, \sqrt {x \left (1-x \right )}}{\sqrt {-\left (-1+x \right ) x}\, \sqrt {1-x}}+\frac {\sqrt {x \left (1-x \right )}\, \arcsin \left (-1+2 x \right )}{2 \sqrt {x}\, \sqrt {1-x}}\) \(60\)

[In]

int(x^(1/2)/(1-x)^(1/2),x,method=_RETURNVERBOSE)

[Out]

I/Pi^(1/2)*(I*Pi^(1/2)*x^(1/2)*(1-x)^(1/2)-I*Pi^(1/2)*arcsin(x^(1/2)))

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00 \[ \int \frac {\sqrt {x}}{\sqrt {1-x}} \, dx=-\sqrt {x} \sqrt {-x + 1} - \arctan \left (\frac {\sqrt {-x + 1}}{\sqrt {x}}\right ) \]

[In]

integrate(x^(1/2)/(1-x)^(1/2),x, algorithm="fricas")

[Out]

-sqrt(x)*sqrt(-x + 1) - arctan(sqrt(-x + 1)/sqrt(x))

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 1.02 (sec) , antiderivative size = 54, normalized size of antiderivative = 2.00 \[ \int \frac {\sqrt {x}}{\sqrt {1-x}} \, dx=\begin {cases} - i \sqrt {x} \sqrt {x - 1} - i \operatorname {acosh}{\left (\sqrt {x} \right )} & \text {for}\: \left |{x}\right | > 1 \\\frac {x^{\frac {3}{2}}}{\sqrt {1 - x}} - \frac {\sqrt {x}}{\sqrt {1 - x}} + \operatorname {asin}{\left (\sqrt {x} \right )} & \text {otherwise} \end {cases} \]

[In]

integrate(x**(1/2)/(1-x)**(1/2),x)

[Out]

Piecewise((-I*sqrt(x)*sqrt(x - 1) - I*acosh(sqrt(x)), Abs(x) > 1), (x**(3/2)/sqrt(1 - x) - sqrt(x)/sqrt(1 - x)
 + asin(sqrt(x)), True))

Maxima [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.37 \[ \int \frac {\sqrt {x}}{\sqrt {1-x}} \, dx=\frac {\sqrt {-x + 1}}{\sqrt {x} {\left (\frac {x - 1}{x} - 1\right )}} - \arctan \left (\frac {\sqrt {-x + 1}}{\sqrt {x}}\right ) \]

[In]

integrate(x^(1/2)/(1-x)^(1/2),x, algorithm="maxima")

[Out]

sqrt(-x + 1)/(sqrt(x)*((x - 1)/x - 1)) - arctan(sqrt(-x + 1)/sqrt(x))

Giac [A] (verification not implemented)

none

Time = 0.37 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.63 \[ \int \frac {\sqrt {x}}{\sqrt {1-x}} \, dx=-\sqrt {x} \sqrt {-x + 1} + \arcsin \left (\sqrt {x}\right ) \]

[In]

integrate(x^(1/2)/(1-x)^(1/2),x, algorithm="giac")

[Out]

-sqrt(x)*sqrt(-x + 1) + arcsin(sqrt(x))

Mupad [B] (verification not implemented)

Time = 0.59 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.15 \[ \int \frac {\sqrt {x}}{\sqrt {1-x}} \, dx=2\,\mathrm {atan}\left (\frac {\sqrt {x}}{\sqrt {1-x}-1}\right )-\sqrt {x}\,\sqrt {1-x} \]

[In]

int(x^(1/2)/(1 - x)^(1/2),x)

[Out]

2*atan(x^(1/2)/((1 - x)^(1/2) - 1)) - x^(1/2)*(1 - x)^(1/2)